<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../JS/vue.js"></script>
    <style>
        .active{
            color: rebeccapurple;
        }
        .line{
            background-color: rgb(145, 174, 199);
        }
    </style>
</head>
<body>
    <div id="app">
        <!-- <img v-bind:src="imgURL" alt=""> -->
        <!-- <div :class="{类名：bool,类名：bool}"> -->
        <div :class="{active:isactive,line:isline}">
            {{message}}
        </div>
        <button v-on:click="btnclick">x</button>
    </div>
    <script>
        const app = new Vue({
            el: '#app',
            data:{
                message: 'whr',
                isactive: true,
                isline:true,
                imgURL:'https://img0.baidu.com/it/u=8013311,3592244460&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=617'
            },
            methods:{
                btnclick:function(){
                    this.isactive = !this.isactive
                }
            }
        })
    </script>
</body>
</html>